﻿using Cubicle.Core.Shared;
using NuGet;

namespace Cubicle.Nuget.Core
{
    public class NugetNLogger : ILogger
    {
        private static NLog.Logger _logger = NLog.LogManager.GetCurrentClassLogger();

        public void Log(MessageLevel level, string message, params object[] args)
        {
            switch (level)
            {
                case MessageLevel.Debug :
                    _logger.Debug(message.Format(args));
                    break;
                case MessageLevel.Error :
                    _logger.Error(message.Format(args));
                    break;
                case MessageLevel.Info :
                    _logger.Info(message.Format(args));
                    break;
                default :
                    _logger.Warn(message.Format(args));
                    break;
            }
        }
    }
}